// 角色模型
module.exports = (sequelize, Sequelize) => {
    return sequelize.define("danmu", {
        id: {
            type: Sequelize.INTEGER,
            comment: '主键',
            notNull: true,
            primaryKey: true,
            autoIncrement: true, // 自增整形主键
        },

        avatar: {
            type: Sequelize.TEXT("long"),
            notNull: true,
            notEmpty: true,
            comment: '评论用户头像',
            field:'avatar'
        },

        nickname: {
            type: Sequelize.STRING,
            notNull: true,
            notEmpty: true,
            comment: '发送弹幕人昵称',
            field: 'nickname'
        },

        content: {
            type: Sequelize.TEXT("long"),
            comment: '评论内容',
        }
    })
}